Git 筆記 - 將該次 commit 變動的檔案打包壓縮


之前常常會有錯誤的 branch 實作,等發現的時候可能已經新增一些檔案了,如果不想用 cherry pick 的話就只能慢慢手動複製檔案,像這時候就可以使用這個 git command 來打包有變動的檔案了。


注:該 command 是打包最後一個 commit 的內容,所以記得先將變動 commit 起來

$ git archive --format=zip --output=export.zip HEAD $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD)
#Git







你可能感興趣的文章

[閱讀組] 如何提交微開發者寫作松單篇作品?

[閱讀組] 如何提交微開發者寫作松單篇作品?

Day02 為資料命名

Day02 為資料命名

簡明人月神話:專案管理之道(The Mythical Man-Month)導讀書摘

簡明人月神話:專案管理之道(The Mythical Man-Month)導讀書摘






留言討論